package cn.config;

import cn.domain.Clazz;
import cn.domain.Stu;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class JavaConfig {
    @Bean({"jee-stu","haut-stu"})
    public Stu stu(){
        Stu stu=new Stu("zhang",21);
        return stu;

    }
    @Bean
    public Clazz clazz(){
        Clazz clazz=new Clazz();
        clazz.setStu(stu());
        clazz.setName("se");
        return clazz;
    }
}
